import request from '@/utils/request'

// 获取模型详情
export function getTaskModelDetail(query) {
  return request({
    url: '/softSoil/getEvaluatePage',
    method: 'get',
    params: query
  })
}

// 查看任务
export function detailTask(query) {
  return request({
    url: '/preAssessTask/findById',
    method: 'get',
    params: query
  })
}

// 获取中间结果
export function getDzzhTaskModel(query) {
  return request({
    url: '/softSoil/getCenterDataPage',
    method: 'get',
    params: query
  })
}
// 获取坡度数据版本
export function getSlopeData(query) {
  return request({
    url: '/softSoil/versionPage',
    method: 'get',
    params: query
  })
}


// 存为中间结果
export function saveAsMiddleResult(data) {
  return request({
    url: '/softSoil/saveToCenterResult',
    method: 'post',
    data: data
  })
}

// 替换为最终结果
export function replaceFinalResult(data) {
  return request({
    url: '/softSoil/saveToFinalResult',
    method: 'post',
    data: data
  })
}

// 删除
export function deleteCenter(data) {
  return request({
    url: '/softSoil/deleteCenterVersion',
    method: 'post',
    data: data
  })
}

// 评估计算
export function count(data) {
  return request({
    url: '/softSoil/evaluate',
    method: 'post',
    data: data
  })
}
// 为任务保存选择的钻孔数据版本
export function selectVersionCode(data) {
  return request({
    url: '/softSoil/saveTaskDrillVersion',
    method: 'post',
    data: data
  })
}

// 保存是否软土震陷生成等震面的计算结果
export function savePolygonEvaluateResult(data) {
  return request({
    url: '/softSoil/savePolygonEvaluateResult',
    method: 'post',
    data: data
  })
}

// 按省统计危险性面积--【软土震陷】分析评估结果
export function countResultAreaByProvince(data) {
  return request({
    url: '/softSoil/countResultAreaByProvince',
    method: 'post',
    data: data
  })
}

// 按市统计危险性面积--【软土震陷】分析评估结果
export function countResultAreaByCity(data) {
  return request({
    url: '/softSoil/countResultAreaByCity',
    method: 'post',
    data: data
  })
}

// 软土震陷点数据集栅格克吕金插值分析提取等值面发布
export function softSoilPointToGridPolygon(data) {
  return request({
    url: '/hypergraph/softSoilPointToGridPolygon',
    method: 'post',
    data: data
  })
}


